export function getCache(key , field){
    let data = localStorage.getItem(key);
    if (data) {
        data = JSON.parse(data);
        return field ? data[field] : data;
    }
    return null;
}

export function setCache(key , value){
    localStorage.setItem(key , JSON.stringify(value))
}


export function removeCache(key){
    localStorage.removeItem(key)
}
